<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>自动代码生成系统-表字段设计</title>
<link href="../../bootstrap-3.1.1-dist/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link rel="stylesheet" type="text/css" href="../../js/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../../bootstrap-select/bootstrap-select.min.css">
<link rel="stylesheet" type="text/css" href="../../js/easyui/themes/icon.css">
<style type="text/css">
.queryCondition{
	width: 1200px;
	float: left;
	min-height:80px;
	margin-left: auto;
	margin-right: auto;
}
.table_data{
	width: 800px;
	float: left;
	margin-left: auto;
	margin-right: auto;	
	min-height: 300px;
}
.querybtn{
	text-align: center;
	border-bottom: 3px solid #1da811;
	padding-bottom: 10px;
}
</style>
<script type="text/javascript" src="../../js/common/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../../bootstrap-3.1.1-dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../../layer/layer.js"></script>
<script type="text/javascript" src="../../js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../../bootstrap-select/bootstrap-select.min.js"></script>
<script type="text/javascript" src="../../admin/sql/javascript/design.js"></script>
</head>
<body>
<div style="width:1200px;margin-left:auto;margin-right:auto;">
		<div class="queryCondition">
			<table style="width: 100%;">
				<tr>
					<td align="right" style="color: #888;">表名:</td>
					<td><input type="text" onkeyup="value=value.replace(/[^\w\.\-\_\/]/ig,'')" id="txtTableName" style="border: 0px;width: 200px;height:30px;margin: 15px 15px 15px 15px;background-color:#ccc;" readonly="readonly"/></td>
					<td align="right" style="color: #888;">创建者:</td>
					<td><input type="text" onkeyup="value=value.replace(/[^\w\.\-\_\/]/ig,'')" id="txtCreateUser"  style="border: 0px;width: 200px;height:30px;margin: 15px 15px 15px 15px;background-color:#ccc;" readonly="readonly"/></td>
					</tr>
				<tr>
				<tr>
					<td align="right" style="color: #888;">创建时间:</td>
					<td><input type="text" onkeyup="value=value.replace(/[^\w\.\-\_\/]/ig,'')" id="txtCreateTime" style="border: 0px;width: 200px;height:30px;margin: 15px 15px 15px 15px;background-color:#ccc;" readonly="readonly"/></td>
					<td align="right" style="color: #888;">最近修改时间:</td>
					<td><input type="text" onkeyup="value=value.replace(/[^\w\.\-\_\/]/ig,'')" id="txtModifyTime"  style="border: 0px;width: 200px;height:30px;margin: 15px 15px 15px 15px;background-color:#ccc;" readonly="readonly"/></td>
					</tr>
				<tr>
				<tr>
					<td align="right" style="color: #888;">描述:</td>
					<td colspan="3">
						<textarea style="border: 0px;width: 815px;height:90px;margin: 15px 15px 15px 15px;background-color:#ccc;" rows="3" cols="3" id="spanTableDesc" readonly="readonly"></textarea>
					</td>					
					</tr>
				<tr>
			</table>
		</div>
		<div class="querybtn">
			<input type="hidden" value="0" id="hidTableNameValue"/>
			<input type="button"  class="btn btn-success" style="width:100px;margin-right: 10px;" value="返回" onclick="btnReturn();"/>
			<input type="button"  class="btn btn-success" style="width:100px;margin-right: 10px;" value="生成备用字段" onclick="btnReady();"/>
			<input type="button" class="btn btn-success" style="width:100px;margin-right: 10px;"  value="生成建表	sql" onclick="createTableSql();"/>
			<input type="button"  class="btn btn-success" style="width:100px;margin-right: 10px;" value="生成sql" onclick="btnSql();"/>
			<input type="button"  class="btn btn-success" style="width:100px;margin-right: 10px;" value="生成表对象" onclick="createTableObject();"/>
			<input type="button"  class="btn btn-success" style="width:100px;margin-right: 10px;" value="生成类" onclick="createClass();"/>
			<input type="button"  class="btn btn-success" style="width:100px;margin-right: 10px;" value="生成方法" onclick="createClass();"/>
		</div>
		<div class="queryCondition">
			<table  class="table table-striped"  style="width: 100%;" id="fieldTable" >
				
			</table>
		<div id="tb" style="height:auto">
			<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="append()">添加</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="removeit()">删除</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" onclick="accept()">保存</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-undo',plain:true" onclick="reject()">取消</a>
		</div>
		<table id="dg" class="easyui-datagrid" style="width:1200px;height:auto" data-options="
                iconCls: 'icon-edit',
                singleSelect: true,
                toolbar: '#tb',
                url: 'datagrid_data1.json',
                method: 'get',
                onClickRow: onClickRow
            "> 
		
		</table>
		<div id="tb" style="height:auto">
			<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="append()">添加</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="removeit()">删除</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" onclick="accept()">保存</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-undo',plain:true" onclick="reject()">取消</a>
		</div>
		</div>
	</div>
	<div style="display:none;color: #444;text-align:center;" id="hidNum">
		<span style="margin-left: 5px;font-size:14px;color:#999;">生成备用字段数量</span>
		<input type="text" style="width: 50px;height:30px;margin:5px 5px 5px 5px;border: 1px #ccc solid;border-radius:2px;" id="txtNum"/><br/>
		<input type="button" value="生成" style="width: 100px;margin:5px 5px 5px 5px;" class="btn btn-primary" onclick="btnGenerateField();"/>
	</div>
	
</body>
</html>